//
//  CoreTests.swift
//  CoreTests
//
//  Created by raymond Peng on 2018/11/8.
//  Copyright © 2018 raymond Peng. All rights reserved.
//

import XCTest
@testable import Core

class CoreTests: XCTestCase {

    override func setUp() {
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }

    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testExample() {
        let exp = expectation(description: "等商城数据看看")
        let shoppingData = ShoppingData.default
        shoppingData.fetchShoppingData { (data, error) in
            if error == nil {
                exp.fulfill()
            } else {
                XCTFail("获取数据时产生错误.")
            }
        }
        waitForExpectations(timeout: 10, handler: nil)
    }

    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measure {
            // Put the code you want to measure the time of here.
        }
    }

}
